﻿Public Class Nvendedores

    Public Function guardarvendedores(ByVal item As Entidades.Evendedores) As Boolean
        Dim oDatos As New Datos.Dvendedores
        Dim oVendedores As New List(Of Entidades.Evendedores)
        Dim band As Boolean
        Try
            band = oDatos.guardarpervendedores(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function eliminarvendedores(ByVal item As Entidades.Evendedores) As Boolean
        Dim oDatos As New Datos.Dvendedores
        Dim oVendedores As New List(Of Entidades.Evendedores)
        Dim band As Boolean
        Try
            band = oDatos.eliminarpervendedores(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function modificarvendedores(ByVal item As Entidades.Evendedores) As Boolean
        Dim oDatos As New Datos.Dvendedores
        Dim oVendedores As New List(Of Entidades.Evendedores)
        Dim band As Boolean
        Try
            band = oDatos.modificarpervendedores(item)
        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
        Return band
    End Function

    Public Function buscarvendedores(ByVal texto As String) As DataTable

        Dim oDatos As New Datos.Dvendedores
        Try
            Return oDatos.buscarpervendedores(texto)

        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

    Public Function buscageneral() As DataTable

        Dim oDatos As New Datos.Dvendedores
        Try
            Return oDatos.buscargeneral

        Catch ex As Exception
            Throw New ArgumentException(ex.Message)
        Finally
            oDatos = Nothing
        End Try
    End Function

End Class
